package com.happiness.base.enums;

import cn.hutool.http.HttpStatus;

/**
 * 请求返回CODE枚举
 * */
public enum ResultCodeEnum {
    SUCCESS(HttpStatus.HTTP_OK,"成功"),
    BAD_REQUEST(HttpStatus.HTTP_BAD_REQUEST,"请求参数错误"),
    UNAUTHORIZED(HttpStatus.HTTP_UNAUTHORIZED,"未登录或登录信息已失效"),
    FORBIDDEN(HttpStatus.HTTP_FORBIDDEN,"拒绝请求，你没有权限"),
    NOT_FOUND(HttpStatus.HTTP_NOT_FOUND,"未找到页面或信息"),
    BAD_METHOD(HttpStatus.HTTP_BAD_METHOD,"拒绝请求，你没有操作权限"),
    CLIENT_TIMEOUT(HttpStatus.HTTP_CLIENT_TIMEOUT,"请求接口超时"),
    GONE(HttpStatus.HTTP_GONE,"请求资源不存在"),
    INTERNAL_ERROR(HttpStatus.HTTP_INTERNAL_ERROR,"系统错误，请联系管理员");
    public int code;
    public String message;

    ResultCodeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
